/* __auth__ : KunLin */
package com.cskaoyan.bean.vo.goods;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class GoodsDetailVO {


    private Integer errno;
    private DataDTO data;
    private String errmsg;

    public GoodsDetailVO success() {
        this.setErrno(0);
        this.setErrmsg("成功");
        return this;
    }

    @Data
    public static class DataDTO {
        private Integer categoryIds;
        private GoodsDTO goods;
        private List<AttributesDTO> attributes;
        private List<SpecificationsDTO> specifications;
        private List<ProductsDTO> products;
    }

    @Data
    public static class GoodsDTO {
        private Integer id;
        private String goodsSn;
        private String name;
        private Integer categoryId;
        private Integer brandId;
        private String[] gallery;
        private String keywords;
        private String brief;
        private Boolean isOnSale;
        private Short sortOrder;
        private String picUrl;
        private String shareUrl;
        private Boolean isNew;
        private Boolean isHot;
        private String unit;
        private BigDecimal counterPrice;
        private BigDecimal retailPrice;
        private Date addTime;
        private Date updateTime;
        private Boolean deleted;
        private String detail;
    }

    @Data
    public static class AttributesDTO {
        private Integer id;
        private Integer goodsId;
        private String attribute;
        private String value;
        private Date addTime;
        private Date updateTime;
        private Boolean deleted;
    }

    @Data
    public static class SpecificationsDTO {
        private Integer id;
        private Integer goodsId;
        private String specification;
        private String value;
        private String picUrl;
        private Date addTime;
        private Date updateTime;
        private Boolean deleted;
    }

    @Data
    public static class ProductsDTO {
        private Integer id;
        private Integer goodsId;
        private String[] specifications;
        private BigDecimal price;
        private Integer number;
        private String url;
        private Date addTime;
        private Date updateTime;
        private Boolean deleted;
    }
}
